﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace CSharpPaint.DrawComponents
{
    public abstract class DrawableComponent
    {
        public int X1 { get; set; }
        public int X2 { get; set; }

        public int Y1 { get; set; }
        public int Y2 { get; set; }

        public Color Color;

        public Dot[] Dots { get; protected set; }

        public List<Dot> Pixels { get; protected set; }

        public DrawableComponent(int x1, int y1, Color color)
        {
            X1 = x1;
            Y1 = y1;
            Color = color;
            Pixels = new List<Dot>();
        }

        public abstract void DrawLastDot(int x2, int y2);

        public abstract int Length();
       
        public abstract int Height();
        public abstract int Width();

        public int HorizontalCenter()
        {
            return Width() / 2;
        }

        public int VerticalCenter()
        {
            return Height() / 2;
        }


    }
}
